package kordegi.forumsystem.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * @author kordegi
 * @date 2022.05.01 17:01
 * @Description
 */

@Data
public class Article {
    private Long id;

    private Long user_id;

    @NotBlank(message = "标题不能为空")
    private String title;

    @NotBlank(message = "概述不能为空")
    private String description;

    @NotBlank(message = "内容不能为空")
    private String content;

    @JsonFormat(pattern="yyyy-MM-dd")
    private LocalDateTime created;

    private Integer status;

    private String section;
}